import Main from "@/components/main";

export default [
  {
    path: "/login",
    name: "login",
    meta: {
      title: "登录页面"
    },
    component: () => import("@/views/login/login.vue")
  },
  {
    path: "/",
    name: "_home",
    redirect: "/home",
    component: Main,
    children: [
      {
        path: "/home",
        name: "home",
        meta: {
          title: "首页"
        },
        component: () => import("@/views/index/home.vue")
      },
      {
        path: "/classification",
        name: "classification",
        meta: {
          title: "分类"
        },
        component: () => import("@/views/index/classification.vue")
      },
      {
        path: "/shop",
        name: "shop",
        meta: {
          title: "我的"
        },
        component: () => import("@/views/index/shop.vue")
      },
      {
        path: "/user",
        name: "user",
        meta: {
          title: "我的"
        },
        component: () => import("@/views/index/user.vue")
      }
    ]
  },
  {
    path: "*",
    name: "error_404",
    meta: {
      hideInMenu: true
    },
    component: () => import("@/views/error-page/404.vue")
  }
];
